package routers

import (
	"books/controllers"
	beego "github.com/beego/beego/v2/server/web"
)

func init() {
	beego.Router("/", &controllers.MainController{})
	beego.Router("/login", &controllers.UserController{}, "post:Login")
	beego.Router("/useradd", &controllers.UserController{}, "post:UserAdd")
	beego.Router("/add", &controllers.BooksController{}, "post:Add")
	beego.Router("/upload", &controllers.BooksController{}, "post:Upload")
	beego.Router("/list", &controllers.BooksController{}, "get:List")
	beego.Router("/del", &controllers.BooksController{}, "get:Del")
	beego.Router("/info", &controllers.BooksController{}, "get:Info")
	beego.Router("/collect", &controllers.BooksController{}, "post:Collect")
	beego.Router("/collList", &controllers.BooksController{}, "get:CollList")
	beego.Router("/commit", &controllers.BooksController{}, "post:Commit")
}
